package com.ibeeking.found.msg.service.common.enums;

public enum MsgReadStatusEnum {
    STATUS_READ("未读", 0),
    STATUS_UNREAD("已读", 1),;

    private String name;
    private Integer value;

    MsgReadStatusEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public Integer getValue() {
        return value;
    }

    public static String getNameByValue(Integer value) {
        for (MsgReadStatusEnum enumObj : values()) {
            if (enumObj.getValue().equals(value)) {
                return enumObj.getName();
            }
        }
        return null;
    }

    public static MsgReadStatusEnum getEnumByValue(Integer value) {
        for (MsgReadStatusEnum enumObj : values()) {
            if (enumObj.getValue().equals(value)) {
                return enumObj;
            }
        }
        return null;
    }
}
